package mortal.mvc.core
{
	import mortal.game.cache.*;
	import mortal.mvc.interfaces.*;
	
	public class Controller extends Object implements IController
	{
		protected var cache:Cache;
		protected var _view:IView;
		
		public function Controller()
		{
			this.cache = Cache.instance;
			this.initServer();
			
		}
		
		public function get view() : IView
		{
			if (this._view == null)
			{
				this._view = this.initView();
			}
			return this._view;
		}
		
		public function set view(param1:IView) : void
		{
			this._view = param1;
			
		}
		
		protected function initServer() : void
		{
			
		}
		
		protected function initView() : IView
		{
			return this._view;
		}
		
		public function popup() : void
		{
			
		}
		
	}
}
